<script setup lang="ts"></script>
<!-- 系统首页 -->
<template>
  <div class="homeView">
    <div class="header">
      <div class="title">
        <a href="#">隧道施工地质灾害诊断系统</a>
        <span class="version">v1.0.0</span>
      </div>

      <div class="headerSelcet">
        <RouterLink to="/welcome" active-class="active">欢迎</RouterLink>
        <RouterLink to="/about" active-class="active">关于</RouterLink>
        <RouterLink to="/register" active-class="active">注册</RouterLink>
        <RouterLink to="/login" active-class="active">登录</RouterLink>
      </div>
    </div>
    <!-- 主体部分 -->
    <div class="homeBody"><RouterView /></div>
  </div>
</template>
<style scoped>
.header {
  width: 100%;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.045);
  display: flex;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  transition: all 210ms;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 2px 5px rgba(242, 242, 242, 0.106);
  z-index: 1000;
}

.title {
  padding-left: 20px;
  padding-top: 18px;
}

.title a {
  text-decoration: none;
  color: inherit;
  outline: none;
  font-size: 28px;
  font-weight: 700;
  margin-right: 5px;
}

.version {
  font-weight: 500;
}

.headerSelcet {
  font-size: 18px;
  padding-top: 20px;
  margin-right: 20px;
  /* a {
    margin: 10px 16px;
    margin-left: clamp(3px, 1vw, 16px);
    margin-right: clamp(3px, 1vw, 16px);
    cursor: pointer;
    position: relative;
    padding: 4px;
    box-sizing: border-box;
    color: #626262;
    font-size: 16px;
    font-weight: 600;
    transition: all 210ms;
    text-decoration: none;
  } */
}

.headerSelcet a {
  margin: 10px 16px;
  margin-left: clamp(3px, 1vw, 16px);
  margin-right: clamp(3px, 1vw, 16px);
  cursor: pointer;
  position: relative;
  padding: 4px;
  box-sizing: border-box;
  color: #626262;
  font-size: 16px;
  font-weight: 600;
  transition: all 210ms;
  text-decoration: none;
}

.headerSelcet a:hover {
  color: #000;
  border-bottom: 2px solid currentColor; /* 下划线样式 */
  padding-bottom: 3px; /* 通过内边距控制距离 */
  display: inline-block; /* 确保下划线只在文本下方 */
}

.headerSelcet a.active {
  color: #000;
  border-bottom: 2px solid currentColor; /* 下划线样式 */
  padding-bottom: 3px; /* 通过内边距控制距离 */
  display: inline-block; /* 确保下划线只在文本下方 */
}

.homeBody {
  margin-top: 60px;
}
</style>
